<template>
  <div>
    <!-- 页面头部 -->
    <van-nav-bar
      title="黑马优购"
      :left-text="title?'':'返回'"
      :left-arrow="title?false:true"
      @click-left="onClickLeft"
      fixed
      class="header"
    />
  </div>
</template>
<script>
export default {
  props: ['title'],
  data() {
    return {}
  },
  methods: {
    onClickLeft() {
<<<<<<< HEAD
<<<<<<< HEAD
      this.$router.go(-1)
=======
     this.$router.go(-1);
>>>>>>> address
=======
     this.$router.go(-1);
>>>>>>> ec09f62117a1eba362805d662ac97675e4c2f397
    }
  }
}
</script>

<style lang="less" scoped>
.header {
  background-color: #c73420;
}
.van-nav-bar__title,
.van-nav-bar__text,
.van-icon {
  color: #fff !important;
}
</style>